Skip to content

Conversation

@madsmtm
Copy link
Member

@madsmtm madsmtm commented Jan 14, 2026

This should make it more ergonomic to pass around.

@madsmtm madsmtm added the enhancement New feature or request label Jan 14, 2026
@madsmtm madsmtm added this to the Softbuffer v0.5 milestone Jan 14, 2026
@madsmtm madsmtm force-pushed the madsmtm/remove-buffer-generics branch 3 times, most recently from 1fe0c88 to d6320a6 Compare January 14, 2026 11:45
@MarijnS95
Copy link
Member

Fortunately backend_dispatch already allowed to omit these on specific backends (https://github.com/MarijnS95/softbuffer/compare/android-surfacecontrol), but it's good to make them disappear from the public API too in light of having a separate buffer creation API.

@madsmtm
Copy link
Member Author

madsmtm commented Jan 17, 2026

it's good to make them disappear from the public API too in light of having a separate buffer creation API.

If we did want to do it, then this PR would perhaps be the wrong approach, since a Buffer would still contain a wl_buffer, which would mean it relied on the connection to the Wayland display server still being alive IIUC.

That said, I'm not really convinced yet myself that would be such a good idea, there's a lot of complexity in allowing manual memory management of buffers.

@madsmtm madsmtm force-pushed the madsmtm/remove-buffer-generics branch from d6320a6 to 920c114 Compare January 17, 2026 07:44
@madsmtm
Copy link
Member Author

madsmtm commented Jan 17, 2026

Anyhow, I'm gonna merge this in a few days unless you have any objections?

@madsmtm madsmtm force-pushed the madsmtm/remove-buffer-generics branch from 920c114 to f12d0b1 Compare January 17, 2026 08:43
This helps evaluate how well `.pixels_mut()` is inlined and such.
This should make it more ergonomic to pass around.
@madsmtm madsmtm force-pushed the madsmtm/remove-buffer-generics branch from f12d0b1 to a9ab4a5 Compare January 17, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants